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

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

Issue 2331033002: [interpreter] Merge {OsrPoll} with {Jump} bytecode. (Closed)
Patch Set: One more test. Created 4 years, 3 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/interpreter.cc ('k') | src/runtime/runtime-compiler.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-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 Node* function = IntPtrAdd(function_table, function_offset); 931 Node* function = IntPtrAdd(function_table, function_offset);
932 Node* function_entry = 932 Node* function_entry =
933 Load(MachineType::Pointer(), function, 933 Load(MachineType::Pointer(), function,
934 IntPtrConstant(offsetof(Runtime::Function, entry))); 934 IntPtrConstant(offsetof(Runtime::Function, entry)));
935 935
936 return CallStub(callable.descriptor(), code_target, context, arg_count, 936 return CallStub(callable.descriptor(), code_target, context, arg_count,
937 first_arg, function_entry, result_size); 937 first_arg, function_entry, result_size);
938 } 938 }
939 939
940 void InterpreterAssembler::UpdateInterruptBudget(Node* weight) { 940 void InterpreterAssembler::UpdateInterruptBudget(Node* weight) {
941 // TODO(rmcilroy): It might be worthwhile to only update the budget for
942 // backwards branches. Those are distinguishable by the {JumpLoop} bytecode.
943
941 Label ok(this), interrupt_check(this, Label::kDeferred), end(this); 944 Label ok(this), interrupt_check(this, Label::kDeferred), end(this);
942 Node* budget_offset = 945 Node* budget_offset =
943 IntPtrConstant(BytecodeArray::kInterruptBudgetOffset - kHeapObjectTag); 946 IntPtrConstant(BytecodeArray::kInterruptBudgetOffset - kHeapObjectTag);
944 947
945 // Update budget by |weight| and check if it reaches zero. 948 // Update budget by |weight| and check if it reaches zero.
946 Variable new_budget(this, MachineRepresentation::kWord32); 949 Variable new_budget(this, MachineRepresentation::kWord32);
947 Node* old_budget = 950 Node* old_budget =
948 Load(MachineType::Int32(), BytecodeArrayTaggedPointer(), budget_offset); 951 Load(MachineType::Int32(), BytecodeArrayTaggedPointer(), budget_offset);
949 new_budget.Bind(Int32Add(old_budget, weight)); 952 new_budget.Bind(Int32Add(old_budget, weight));
950 Node* condition = 953 Node* condition =
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 Goto(&loop); 1362 Goto(&loop);
1360 } 1363 }
1361 Bind(&done_loop); 1364 Bind(&done_loop);
1362 1365
1363 return array; 1366 return array;
1364 } 1367 }
1365 1368
1366 } // namespace interpreter 1369 } // namespace interpreter
1367 } // namespace internal 1370 } // namespace internal
1368 } // namespace v8 1371 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698