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

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

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (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
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/isolate.cc » ('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 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 // Returns state for for..in loop execution based on the object in the register 2393 // Returns state for for..in loop execution based on the object in the register
2394 // |receiver|. The object must not be null or undefined and must have been 2394 // |receiver|. The object must not be null or undefined and must have been
2395 // converted to a receiver already. 2395 // converted to a receiver already.
2396 // The result is output in registers |cache_info_triple| to 2396 // The result is output in registers |cache_info_triple| to
2397 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, 2397 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array,
2398 // and cache_length respectively. 2398 // and cache_length respectively.
2399 void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { 2399 void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) {
2400 Node* object_reg = __ BytecodeOperandReg(0); 2400 Node* object_reg = __ BytecodeOperandReg(0);
2401 Node* receiver = __ LoadRegister(object_reg); 2401 Node* receiver = __ LoadRegister(object_reg);
2402 Node* context = __ GetContext(); 2402 Node* context = __ GetContext();
2403 Node* const zero_smi = __ SmiConstant(Smi::kZero); 2403 Node* const zero_smi = __ SmiConstant(Smi::FromInt(0));
2404 2404
2405 Label nothing_to_iterate(assembler, Label::kDeferred), 2405 Label nothing_to_iterate(assembler, Label::kDeferred),
2406 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred); 2406 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred);
2407 2407
2408 if (FLAG_debug_code) { 2408 if (FLAG_debug_code) {
2409 Label already_receiver(assembler), abort(assembler); 2409 Label already_receiver(assembler), abort(assembler);
2410 Node* instance_type = __ LoadInstanceType(receiver); 2410 Node* instance_type = __ LoadInstanceType(receiver);
2411 __ Branch(__ IsJSReceiverInstanceType(instance_type), &already_receiver, 2411 __ Branch(__ IsJSReceiverInstanceType(instance_type), &already_receiver,
2412 &abort); 2412 &abort);
2413 __ Bind(&abort); 2413 __ Bind(&abort);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2635 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2636 __ SmiTag(new_state)); 2636 __ SmiTag(new_state));
2637 __ SetAccumulator(old_state); 2637 __ SetAccumulator(old_state);
2638 2638
2639 __ Dispatch(); 2639 __ Dispatch();
2640 } 2640 }
2641 2641
2642 } // namespace interpreter 2642 } // namespace interpreter
2643 } // namespace internal 2643 } // namespace internal
2644 } // namespace v8 2644 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698