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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 1480003002: [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add patch from Orion for interpreter cementation test. Disable obsolete/invalid tests. Created 5 years 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/compiler/bytecode-graph-builder.h ('k') | src/compiler/js-call-reducer.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/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "src/interpreter/bytecode-array-iterator.h" 9 #include "src/interpreter/bytecode-array-iterator.h"
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 142
143 Node* BytecodeGraphBuilder::BuildLoadImmutableObjectField(Node* object, 143 Node* BytecodeGraphBuilder::BuildLoadImmutableObjectField(Node* object,
144 int offset) { 144 int offset) {
145 return graph()->NewNode(jsgraph()->machine()->Load(kMachAnyTagged), object, 145 return graph()->NewNode(jsgraph()->machine()->Load(kMachAnyTagged), object,
146 jsgraph()->IntPtrConstant(offset - kHeapObjectTag), 146 jsgraph()->IntPtrConstant(offset - kHeapObjectTag),
147 graph()->start(), graph()->start()); 147 graph()->start(), graph()->start());
148 } 148 }
149 149
150 150
151 Node* BytecodeGraphBuilder::BuildLoadGlobalObject() {
152 const Operator* load_op =
153 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true);
154 return NewNode(load_op, GetFunctionContext());
155 }
156
157
158 Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) { 151 Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) {
159 Node* global = BuildLoadGlobalObject(); 152 const Operator* op =
160 Node* native_context = 153 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
161 BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset); 154 Node* native_context = NewNode(op, environment()->Context());
162 return NewNode(javascript()->LoadContext(0, index, true), native_context); 155 return NewNode(javascript()->LoadContext(0, index, true), native_context);
163 } 156 }
164 157
165 158
166 Node* BytecodeGraphBuilder::BuildLoadFeedbackVector() { 159 Node* BytecodeGraphBuilder::BuildLoadFeedbackVector() {
167 if (!feedback_vector_.is_set()) { 160 if (!feedback_vector_.is_set()) {
168 Node* closure = GetFunctionClosure(); 161 Node* closure = GetFunctionClosure();
169 Node* shared = BuildLoadImmutableObjectField( 162 Node* shared = BuildLoadImmutableObjectField(
170 closure, JSFunction::kSharedFunctionInfoOffset); 163 closure, JSFunction::kSharedFunctionInfoOffset);
171 Node* vector = BuildLoadImmutableObjectField( 164 Node* vector = BuildLoadImmutableObjectField(
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1245
1253 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1246 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1254 if (environment()->IsMarkedAsUnreachable()) return; 1247 if (environment()->IsMarkedAsUnreachable()) return;
1255 environment()->MarkAsUnreachable(); 1248 environment()->MarkAsUnreachable();
1256 exit_controls_.push_back(exit); 1249 exit_controls_.push_back(exit);
1257 } 1250 }
1258 1251
1259 } // namespace compiler 1252 } // namespace compiler
1260 } // namespace internal 1253 } // namespace internal
1261 } // namespace v8 1254 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698