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

Side by Side Diff: src/bootstrapper.cc

Issue 2590373002: [builtins] Add ReturnReceiver builtin (Closed)
Patch Set: remvoe prototype from name Created 3 years, 12 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/builtins.h » ('j') | src/builtins/builtins-promise.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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 Builtins::kPromiseThen, 2, true); 1876 Builtins::kPromiseThen, 2, true);
1877 JSObject::AddProperty(prototype, isolate->factory()->then_string(), 1877 JSObject::AddProperty(prototype, isolate->factory()->then_string(),
1878 promise_then, DONT_ENUM); 1878 promise_then, DONT_ENUM);
1879 InstallWithIntrinsicDefaultProto(isolate, promise_then, 1879 InstallWithIntrinsicDefaultProto(isolate, promise_then,
1880 Context::PROMISE_THEN_INDEX); 1880 Context::PROMISE_THEN_INDEX);
1881 1881
1882 // TODO(gsathya): Move to TF 1882 // TODO(gsathya): Move to TF
1883 SimpleInstallFunction(prototype, "catch", Builtins::kIllegal, 1, true, 1883 SimpleInstallFunction(prototype, "catch", Builtins::kIllegal, 1, true,
1884 DONT_ENUM); 1884 DONT_ENUM);
1885 1885
1886 SimpleInstallGetter(promise_fun, factory->symbol_species_string(),
1887 factory->species_symbol(),
1888 Builtins::kPromiseSpeciesGetter, true);
1889
1886 Handle<Map> prototype_map(prototype->map()); 1890 Handle<Map> prototype_map(prototype->map());
1887 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); 1891 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
1888 1892
1889 // Store the initial Promise.prototype map. This is used in fast-path 1893 // Store the initial Promise.prototype map. This is used in fast-path
1890 // checks. Do not alter the prototype after this point. 1894 // checks. Do not alter the prototype after this point.
1891 native_context()->set_promise_prototype_map(*prototype_map); 1895 native_context()->set_promise_prototype_map(*prototype_map);
1892 1896
1893 { // Internal: PromiseInternalConstructor 1897 { // Internal: PromiseInternalConstructor
1894 Handle<JSFunction> function = 1898 Handle<JSFunction> function =
1895 SimpleCreateFunction(isolate, factory->empty_string(), 1899 SimpleCreateFunction(isolate, factory->empty_string(),
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); 2067 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
2064 2068
2065 // Store the initial RegExp.prototype map. This is used in fast-path 2069 // Store the initial RegExp.prototype map. This is used in fast-path
2066 // checks. Do not alter the prototype after this point. 2070 // checks. Do not alter the prototype after this point.
2067 native_context()->set_regexp_prototype_map(*prototype_map); 2071 native_context()->set_regexp_prototype_map(*prototype_map);
2068 } 2072 }
2069 2073
2070 { 2074 {
2071 // RegExp getters and setters. 2075 // RegExp getters and setters.
2072 2076
2073 SimpleInstallGetter(regexp_fun, 2077 SimpleInstallGetter(regexp_fun, factory->symbol_species_string(),
2074 factory->InternalizeUtf8String("[Symbol.species]"),
2075 factory->species_symbol(), 2078 factory->species_symbol(),
2076 Builtins::kRegExpPrototypeSpeciesGetter, true); 2079 Builtins::kRegExpPrototypeSpeciesGetter, true);
2077 2080
2078 // Static properties set by a successful match. 2081 // Static properties set by a successful match.
2079 2082
2080 const PropertyAttributes no_enum = DONT_ENUM; 2083 const PropertyAttributes no_enum = DONT_ENUM;
2081 SimpleInstallGetterSetter(regexp_fun, factory->input_string(), 2084 SimpleInstallGetterSetter(regexp_fun, factory->input_string(),
2082 Builtins::kRegExpInputGetter, 2085 Builtins::kRegExpInputGetter,
2083 Builtins::kRegExpInputSetter, no_enum); 2086 Builtins::kRegExpInputSetter, no_enum);
2084 SimpleInstallGetterSetter( 2087 SimpleInstallGetterSetter(
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 } 4659 }
4657 4660
4658 4661
4659 // Called when the top-level V8 mutex is destroyed. 4662 // Called when the top-level V8 mutex is destroyed.
4660 void Bootstrapper::FreeThreadResources() { 4663 void Bootstrapper::FreeThreadResources() {
4661 DCHECK(!IsActive()); 4664 DCHECK(!IsActive());
4662 } 4665 }
4663 4666
4664 } // namespace internal 4667 } // namespace internal
4665 } // namespace v8 4668 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698