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

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

Issue 2501503005: [Interpreter] Add SetPendingMessage bytecode. (Closed)
Patch Set: cl format Created 4 years, 1 month 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/bytecodes.h ('k') | src/runtime/runtime.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 #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 __ Dispatch(); 2364 __ Dispatch();
2365 2365
2366 __ Bind(&stack_check_interrupt); 2366 __ Bind(&stack_check_interrupt);
2367 { 2367 {
2368 Node* context = __ GetContext(); 2368 Node* context = __ GetContext();
2369 __ CallRuntime(Runtime::kStackGuard, context); 2369 __ CallRuntime(Runtime::kStackGuard, context);
2370 __ Dispatch(); 2370 __ Dispatch();
2371 } 2371 }
2372 } 2372 }
2373 2373
2374 // SetPendingMessage
2375 //
2376 // Sets the pending message to the value in the accumulator, and returns the
2377 // previous pending message in the accumulator.
2378 void Interpreter::DoSetPendingMessage(InterpreterAssembler* assembler) {
2379 Node* pending_message = __ ExternalConstant(
2380 ExternalReference::address_of_pending_message_obj(isolate_));
2381 Node* previous_message =
2382 __ Load(MachineType::TaggedPointer(), pending_message);
2383 Node* new_message = __ GetAccumulator();
2384 __ StoreNoWriteBarrier(MachineRepresentation::kTaggedPointer, pending_message,
2385 new_message);
2386 __ SetAccumulator(previous_message);
2387 __ Dispatch();
2388 }
2389
2374 // Throw 2390 // Throw
2375 // 2391 //
2376 // Throws the exception in the accumulator. 2392 // Throws the exception in the accumulator.
2377 void Interpreter::DoThrow(InterpreterAssembler* assembler) { 2393 void Interpreter::DoThrow(InterpreterAssembler* assembler) {
2378 Node* exception = __ GetAccumulator(); 2394 Node* exception = __ GetAccumulator();
2379 Node* context = __ GetContext(); 2395 Node* context = __ GetContext();
2380 __ CallRuntime(Runtime::kThrow, context, exception); 2396 __ CallRuntime(Runtime::kThrow, context, exception);
2381 // We shouldn't ever return from a throw. 2397 // We shouldn't ever return from a throw.
2382 __ Abort(kUnexpectedReturnFromThrow); 2398 __ Abort(kUnexpectedReturnFromThrow);
2383 } 2399 }
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2699 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2684 __ SmiTag(new_state)); 2700 __ SmiTag(new_state));
2685 __ SetAccumulator(old_state); 2701 __ SetAccumulator(old_state);
2686 2702
2687 __ Dispatch(); 2703 __ Dispatch();
2688 } 2704 }
2689 2705
2690 } // namespace interpreter 2706 } // namespace interpreter
2691 } // namespace internal 2707 } // namespace internal
2692 } // namespace v8 2708 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698