Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 8
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { 1150 void Interpreter::DoTestIn(InterpreterAssembler* assembler) {
1151 DoBinaryOp(CodeFactory::HasProperty(isolate_), assembler); 1151 DoBinaryOp(CodeFactory::HasProperty(isolate_), assembler);
1152 } 1152 }
1153 1153
1154 1154
1155 // TestInstanceOf <src> 1155 // TestInstanceOf <src>
1156 // 1156 //
1157 // Test if the object referenced by the <src> register is an an instance of type 1157 // Test if the object referenced by the <src> register is an an instance of type
1158 // referenced by the accumulator. 1158 // referenced by the accumulator.
1159 void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) { 1159 void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) {
1160 DoBinaryOp(Runtime::kInstanceOf, assembler); 1160 DoBinaryOp(CodeFactory::InstanceOf(isolate_), assembler);
1161 } 1161 }
1162 1162
1163 void Interpreter::DoTypeConversionOp(Callable callable, 1163 void Interpreter::DoTypeConversionOp(Callable callable,
1164 InterpreterAssembler* assembler) { 1164 InterpreterAssembler* assembler) {
1165 Node* target = __ HeapConstant(callable.code()); 1165 Node* target = __ HeapConstant(callable.code());
1166 Node* accumulator = __ GetAccumulator(); 1166 Node* accumulator = __ GetAccumulator();
1167 Node* context = __ GetContext(); 1167 Node* context = __ GetContext();
1168 Node* result = 1168 Node* result =
1169 __ CallStub(callable.descriptor(), target, context, accumulator); 1169 __ CallStub(callable.descriptor(), target, context, accumulator);
1170 __ SetAccumulator(result); 1170 __ SetAccumulator(result);
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
1830 __ SmiTag(new_state)); 1830 __ SmiTag(new_state));
1831 __ SetAccumulator(old_state); 1831 __ SetAccumulator(old_state);
1832 1832
1833 __ Dispatch(); 1833 __ Dispatch();
1834 } 1834 }
1835 1835
1836 } // namespace interpreter 1836 } // namespace interpreter
1837 } // namespace internal 1837 } // namespace internal
1838 } // namespace v8 1838 } // namespace v8
OLDNEW
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698