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

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

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/compiler/access-builder.cc ('k') | src/compiler/js-native-context-specialization.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3698 Node* AstGraphBuilder::BuildLoadGlobalObject() { 3698 Node* AstGraphBuilder::BuildLoadGlobalObject() {
3699 const Operator* load_op = 3699 const Operator* load_op =
3700 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true); 3700 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true);
3701 return NewNode(load_op, GetFunctionContext()); 3701 return NewNode(load_op, GetFunctionContext());
3702 } 3702 }
3703 3703
3704 3704
3705 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { 3705 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) {
3706 Node* global = BuildLoadGlobalObject(); 3706 Node* global = BuildLoadGlobalObject();
3707 Node* native_context = 3707 Node* native_context =
3708 BuildLoadObjectField(global, GlobalObject::kNativeContextOffset); 3708 BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset);
3709 return NewNode(javascript()->LoadContext(0, index, true), native_context); 3709 return NewNode(javascript()->LoadContext(0, index, true), native_context);
3710 } 3710 }
3711 3711
3712 3712
3713 Node* AstGraphBuilder::BuildLoadGlobalProxy() { 3713 Node* AstGraphBuilder::BuildLoadGlobalProxy() {
3714 Node* global = BuildLoadGlobalObject(); 3714 Node* global = BuildLoadGlobalObject();
3715 Node* proxy = 3715 Node* proxy =
3716 BuildLoadObjectField(global, JSGlobalObject::kGlobalProxyOffset); 3716 BuildLoadObjectField(global, JSGlobalObject::kGlobalProxyOffset);
3717 return proxy; 3717 return proxy;
3718 } 3718 }
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
4282 // Phi does not exist yet, introduce one. 4282 // Phi does not exist yet, introduce one.
4283 value = NewPhi(inputs, value, control); 4283 value = NewPhi(inputs, value, control);
4284 value->ReplaceInput(inputs - 1, other); 4284 value->ReplaceInput(inputs - 1, other);
4285 } 4285 }
4286 return value; 4286 return value;
4287 } 4287 }
4288 4288
4289 } // namespace compiler 4289 } // namespace compiler
4290 } // namespace internal 4290 } // namespace internal
4291 } // namespace v8 4291 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698