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

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

Issue 2395453002: [stubs] Add String and JSReceiver instance type predicates (Closed)
Patch Set: Created 4 years, 2 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
« src/code-stubs.cc ('K') | « src/code-stubs.cc ('k') | no next file » | 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 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 Node* receiver = __ LoadRegister(object_reg); 2364 Node* receiver = __ LoadRegister(object_reg);
2365 Node* context = __ GetContext(); 2365 Node* context = __ GetContext();
2366 Node* const zero_smi = __ SmiConstant(Smi::FromInt(0)); 2366 Node* const zero_smi = __ SmiConstant(Smi::FromInt(0));
2367 2367
2368 Label nothing_to_iterate(assembler, Label::kDeferred), 2368 Label nothing_to_iterate(assembler, Label::kDeferred),
2369 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred); 2369 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred);
2370 2370
2371 if (FLAG_debug_code) { 2371 if (FLAG_debug_code) {
2372 Label already_receiver(assembler), abort(assembler); 2372 Label already_receiver(assembler), abort(assembler);
2373 Node* instance_type = __ LoadInstanceType(receiver); 2373 Node* instance_type = __ LoadInstanceType(receiver);
2374 Node* first_receiver_type = __ Int32Constant(FIRST_JS_RECEIVER_TYPE); 2374 __ Branch(__ IsJSReceiverInstanceType(instance_type), &already_receiver,
2375 __ BranchIfInt32GreaterThanOrEqual(instance_type, first_receiver_type, 2375 &abort);
2376 &already_receiver, &abort);
2377 __ Bind(&abort); 2376 __ Bind(&abort);
2378 { 2377 {
2379 __ Abort(kExpectedJSReceiver); 2378 __ Abort(kExpectedJSReceiver);
2380 // TODO(klaasb) remove this unreachable Goto once Abort ends the block 2379 // TODO(klaasb) remove this unreachable Goto once Abort ends the block
2381 __ Goto(&already_receiver); 2380 __ Goto(&already_receiver);
2382 } 2381 }
2383 __ Bind(&already_receiver); 2382 __ Bind(&already_receiver);
2384 } 2383 }
2385 2384
2386 __ CheckEnumCache(receiver, &use_enum_cache, &use_runtime); 2385 __ CheckEnumCache(receiver, &use_enum_cache, &use_runtime);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2598 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2600 __ SmiTag(new_state)); 2599 __ SmiTag(new_state));
2601 __ SetAccumulator(old_state); 2600 __ SetAccumulator(old_state);
2602 2601
2603 __ Dispatch(); 2602 __ Dispatch();
2604 } 2603 }
2605 2604
2606 } // namespace interpreter 2605 } // namespace interpreter
2607 } // namespace internal 2606 } // namespace internal
2608 } // namespace v8 2607 } // namespace v8
OLDNEW
« src/code-stubs.cc ('K') | « src/code-stubs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698