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

Side by Side Diff: src/bootstrapper.cc

Issue 1349643002: [builtins] Also simplify the Symbol constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringConstructor
Patch Set: Fix off-by-1 in DCHECK. Created 5 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 | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')
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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 AccessorConstantDescriptor d(factory->length_string(), string_length, 1140 AccessorConstantDescriptor d(factory->length_string(), string_length,
1141 attribs); 1141 attribs);
1142 string_map->AppendDescriptor(&d); 1142 string_map->AppendDescriptor(&d);
1143 } 1143 }
1144 } 1144 }
1145 1145
1146 { 1146 {
1147 // --- S y m b o l --- 1147 // --- S y m b o l ---
1148 Handle<JSFunction> symbol_fun = InstallFunction( 1148 Handle<JSFunction> symbol_fun = InstallFunction(
1149 global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, 1149 global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
1150 isolate->initial_object_prototype(), Builtins::kIllegal); 1150 isolate->initial_object_prototype(), Builtins::kSymbolConstructor);
1151 symbol_fun->shared()->set_construct_stub(isolate->builtins()->builtin(
1152 Builtins::kSymbolConstructor_ConstructStub));
1153 symbol_fun->shared()->set_internal_formal_parameter_count(1);
1154 symbol_fun->shared()->set_length(1);
1151 native_context()->set_symbol_function(*symbol_fun); 1155 native_context()->set_symbol_function(*symbol_fun);
1152 } 1156 }
1153 1157
1154 { // --- D a t e --- 1158 { // --- D a t e ---
1155 // Builtin functions for Date.prototype. 1159 // Builtin functions for Date.prototype.
1156 InstallFunction(global, "Date", JS_DATE_TYPE, JSDate::kSize, 1160 InstallFunction(global, "Date", JS_DATE_TYPE, JSDate::kSize,
1157 isolate->initial_object_prototype(), Builtins::kIllegal); 1161 isolate->initial_object_prototype(), Builtins::kIllegal);
1158 } 1162 }
1159 1163
1160 1164
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after
3226 } 3230 }
3227 3231
3228 3232
3229 // Called when the top-level V8 mutex is destroyed. 3233 // Called when the top-level V8 mutex is destroyed.
3230 void Bootstrapper::FreeThreadResources() { 3234 void Bootstrapper::FreeThreadResources() {
3231 DCHECK(!IsActive()); 3235 DCHECK(!IsActive());
3232 } 3236 }
3233 3237
3234 } // namespace internal 3238 } // namespace internal
3235 } // namespace v8 3239 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698