Skip to content

Commit

Permalink
Fix spelling of getIteratorSymbol.
Browse files Browse the repository at this point in the history
Summary: |

Reviewed By: dulinriley

Differential Revision: D19108696

fbshipit-source-id: c98b6b1ed03fc1eb51747b424b27690c0e75736c
  • Loading branch information
avp authored and facebook-github-bot committed Dec 19, 2019
1 parent 82a6524 commit 2be95ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/IRGen/ESTreeIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,15 +628,15 @@ void ESTreeIRGen::emitEnsureObject(Value *value, StringRef message) {
{value, Builder.getLiteralString(message)});
}

Value *ESTreeIRGen::emitIterarorSymbol() {
// FIXME: use the builtin value of @@iteraror. Symbol could have been
Value *ESTreeIRGen::emitIteratorSymbol() {
// FIXME: use the builtin value of @@iterator. Symbol could have been
// overridden.
return Builder.createLoadPropertyInst(
Builder.createTryLoadGlobalPropertyInst("Symbol"), "iterator");
}

ESTreeIRGen::IteratorRecordSlow ESTreeIRGen::emitGetIteratorSlow(Value *obj) {
auto *method = Builder.createLoadPropertyInst(obj, emitIterarorSymbol());
auto *method = Builder.createLoadPropertyInst(obj, emitIteratorSymbol());
auto *iterator = Builder.createCallInst(method, obj, {});

emitEnsureObject(iterator, "iterator is not an object");
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/ESTreeIRGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ class ESTreeIRGen {
void emitEnsureObject(Value *value, StringRef message);

/// \return the internal value @@iterator
Value *emitIterarorSymbol();
Value *emitIteratorSymbol();

/// IteratorRecord as defined in ES2018 7.4.1 GetIterator
struct IteratorRecordSlow {
Expand Down

0 comments on commit 2be95ee

Please sign in to comment.