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

Side by Side Diff: src/factory.cc

Issue 1218783005: Support for global var shortcuts in script contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing builds Created 5 years, 5 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/contexts.cc ('k') | src/globals.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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 if (name->IsString()) { 682 if (name->IsString()) {
683 symbol->set_name(*name); 683 symbol->set_name(*name);
684 } else { 684 } else {
685 DCHECK(name->IsUndefined()); 685 DCHECK(name->IsUndefined());
686 } 686 }
687 return symbol; 687 return symbol;
688 } 688 }
689 689
690 690
691 Handle<Context> Factory::NewNativeContext() { 691 Handle<Context> Factory::NewNativeContext() {
692 Handle<FixedArray> array = NewFixedArray(Context::NATIVE_CONTEXT_SLOTS); 692 Handle<FixedArray> array =
693 NewFixedArray(Context::NATIVE_CONTEXT_SLOTS, TENURED);
693 array->set_map_no_write_barrier(*native_context_map()); 694 array->set_map_no_write_barrier(*native_context_map());
694 Handle<Context> context = Handle<Context>::cast(array); 695 Handle<Context> context = Handle<Context>::cast(array);
695 context->set_js_array_maps(*undefined_value()); 696 context->set_js_array_maps(*undefined_value());
696 DCHECK(context->IsNativeContext()); 697 DCHECK(context->IsNativeContext());
697 return context; 698 return context;
698 } 699 }
699 700
700 701
701 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function, 702 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function,
702 Handle<ScopeInfo> scope_info) { 703 Handle<ScopeInfo> scope_info) {
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 } 2431 }
2431 2432
2432 2433
2433 Handle<Object> Factory::ToBoolean(bool value) { 2434 Handle<Object> Factory::ToBoolean(bool value) {
2434 return value ? true_value() : false_value(); 2435 return value ? true_value() : false_value();
2435 } 2436 }
2436 2437
2437 2438
2438 } // namespace internal 2439 } // namespace internal
2439 } // namespace v8 2440 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698