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

Side by Side Diff: src/factory.cc

Issue 2301913002: Rename SloppyBlockWithEvalContextExtension to ContextExtension (Closed)
Patch Set: updates 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/factory.h ('k') | src/objects.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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { 95 Handle<PrototypeInfo> Factory::NewPrototypeInfo() {
96 Handle<PrototypeInfo> result = 96 Handle<PrototypeInfo> result =
97 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); 97 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE));
98 result->set_prototype_users(WeakFixedArray::Empty()); 98 result->set_prototype_users(WeakFixedArray::Empty());
99 result->set_registry_slot(PrototypeInfo::UNREGISTERED); 99 result->set_registry_slot(PrototypeInfo::UNREGISTERED);
100 result->set_validity_cell(Smi::FromInt(0)); 100 result->set_validity_cell(Smi::FromInt(0));
101 result->set_bit_field(0); 101 result->set_bit_field(0);
102 return result; 102 return result;
103 } 103 }
104 104
105 105 Handle<ContextExtension> Factory::NewContextExtension(
106 Handle<SloppyBlockWithEvalContextExtension> 106 Handle<ScopeInfo> scope_info, Handle<Object> extension) {
107 Factory::NewSloppyBlockWithEvalContextExtension(
108 Handle<ScopeInfo> scope_info, Handle<JSObject> extension) {
109 DCHECK(scope_info->is_declaration_scope()); 107 DCHECK(scope_info->is_declaration_scope());
110 Handle<SloppyBlockWithEvalContextExtension> result = 108 Handle<ContextExtension> result =
111 Handle<SloppyBlockWithEvalContextExtension>::cast( 109 Handle<ContextExtension>::cast(NewStruct(CONTEXT_EXTENSION_TYPE));
112 NewStruct(SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE));
113 result->set_scope_info(*scope_info); 110 result->set_scope_info(*scope_info);
114 result->set_extension(*extension); 111 result->set_extension(*extension);
115 return result; 112 return result;
116 } 113 }
117 114
118 Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string, 115 Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string,
119 Handle<Object> to_number, 116 Handle<Object> to_number,
120 const char* type_of, byte kind) { 117 const char* type_of, byte kind) {
121 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE); 118 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE);
122 Oddball::Initialize(isolate(), oddball, to_string, to_number, type_of, kind); 119 Oddball::Initialize(isolate(), oddball, to_string, to_number, type_of, kind);
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 Handle<AccessorInfo> prototype = 2508 Handle<AccessorInfo> prototype =
2512 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2509 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2513 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2510 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2514 prototype, attribs); 2511 prototype, attribs);
2515 map->AppendDescriptor(&d); 2512 map->AppendDescriptor(&d);
2516 } 2513 }
2517 } 2514 }
2518 2515
2519 } // namespace internal 2516 } // namespace internal
2520 } // namespace v8 2517 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698