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

Side by Side Diff: src/bootstrapper.cc

Issue 1421033002: [es6] Partially implement Reflect.defineProperty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 if (!FLAG_harmony_reflect) return; 2187 if (!FLAG_harmony_reflect) return;
2188 2188
2189 Handle<JSGlobalObject> global(JSGlobalObject::cast( 2189 Handle<JSGlobalObject> global(JSGlobalObject::cast(
2190 native_context()->global_object())); 2190 native_context()->global_object()));
2191 Handle<String> reflect_string = 2191 Handle<String> reflect_string =
2192 factory()->NewStringFromStaticChars("Reflect"); 2192 factory()->NewStringFromStaticChars("Reflect");
2193 Handle<JSObject> reflect = 2193 Handle<JSObject> reflect =
2194 factory()->NewJSObject(isolate()->object_function(), TENURED); 2194 factory()->NewJSObject(isolate()->object_function(), TENURED);
2195 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); 2195 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM);
2196 2196
2197 SimpleInstallFunction(reflect, "defineProperty",
2198 Builtins::kReflectDefineProperty, 3, true);
2197 SimpleInstallFunction(reflect, "deleteProperty", 2199 SimpleInstallFunction(reflect, "deleteProperty",
2198 Builtins::kReflectDeleteProperty, 2, true); 2200 Builtins::kReflectDeleteProperty, 2, true);
2199 SimpleInstallFunction(reflect, "get", 2201 SimpleInstallFunction(reflect, "get",
2200 Builtins::kReflectGet, 3, false); 2202 Builtins::kReflectGet, 3, false);
2201 SimpleInstallFunction(reflect, "getPrototypeOf", 2203 SimpleInstallFunction(reflect, "getPrototypeOf",
2202 Builtins::kReflectGetPrototypeOf, 1, true); 2204 Builtins::kReflectGetPrototypeOf, 1, true);
2203 SimpleInstallFunction(reflect, "has", 2205 SimpleInstallFunction(reflect, "has",
2204 Builtins::kReflectHas, 2, true); 2206 Builtins::kReflectHas, 2, true);
2205 SimpleInstallFunction(reflect, "isExtensible", 2207 SimpleInstallFunction(reflect, "isExtensible",
2206 Builtins::kReflectIsExtensible, 1, true); 2208 Builtins::kReflectIsExtensible, 1, true);
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3327 } 3329 }
3328 3330
3329 3331
3330 // Called when the top-level V8 mutex is destroyed. 3332 // Called when the top-level V8 mutex is destroyed.
3331 void Bootstrapper::FreeThreadResources() { 3333 void Bootstrapper::FreeThreadResources() {
3332 DCHECK(!IsActive()); 3334 DCHECK(!IsActive());
3333 } 3335 }
3334 3336
3335 } // namespace internal 3337 } // namespace internal
3336 } // namespace v8 3338 } // 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