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

Side by Side Diff: src/bootstrapper.cc

Issue 2780173002: [regexp] Add support for dotAll flag (Closed)
Patch Set: Address comments Created 3 years, 8 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/assembler.cc ('k') | src/builtins/builtins-definitions.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/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 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after
3994 handle(isolate()->builtins()->builtin(Builtins::kPromiseThrowerFinally), 3994 handle(isolate()->builtins()->builtin(Builtins::kPromiseThrowerFinally),
3995 isolate()); 3995 isolate());
3996 Handle<SharedFunctionInfo> info = factory()->NewSharedFunctionInfo( 3996 Handle<SharedFunctionInfo> info = factory()->NewSharedFunctionInfo(
3997 factory()->empty_string(), code, false); 3997 factory()->empty_string(), code, false);
3998 info->set_internal_formal_parameter_count(0); 3998 info->set_internal_formal_parameter_count(0);
3999 info->set_length(0); 3999 info->set_length(0);
4000 native_context()->set_promise_thrower_finally_shared_fun(*info); 4000 native_context()->set_promise_thrower_finally_shared_fun(*info);
4001 } 4001 }
4002 } 4002 }
4003 4003
4004 void Genesis::InitializeGlobal_harmony_regexp_dotall() {
4005 if (!FLAG_harmony_regexp_dotall) return;
4006
4007 Handle<JSFunction> constructor(native_context()->regexp_function());
4008 Handle<JSObject> prototype(JSObject::cast(constructor->instance_prototype()));
4009
4010 SimpleInstallGetter(prototype, isolate()->factory()->dotAll_string(),
4011 Builtins::kRegExpPrototypeDotAllGetter, true);
4012
4013 // The regexp prototype map has changed because we added a property
4014 // to it, so we update the saved map.
4015 Handle<Map> prototype_map(prototype->map());
4016 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate());
4017 native_context()->set_regexp_prototype_map(*prototype_map);
4018 }
4019
4004 #ifdef V8_I18N_SUPPORT 4020 #ifdef V8_I18N_SUPPORT
4005 void Genesis::InitializeGlobal_datetime_format_to_parts() { 4021 void Genesis::InitializeGlobal_datetime_format_to_parts() {
4006 if (!FLAG_datetime_format_to_parts) return; 4022 if (!FLAG_datetime_format_to_parts) return;
4007 Handle<JSReceiver> exports_container( 4023 Handle<JSReceiver> exports_container(
4008 JSReceiver::cast(native_context()->exports_container())); 4024 JSReceiver::cast(native_context()->exports_container()));
4009 Handle<JSObject> date_time_format_prototype(JSObject::cast( 4025 Handle<JSObject> date_time_format_prototype(JSObject::cast(
4010 native_context()->intl_date_time_format_function()->prototype())); 4026 native_context()->intl_date_time_format_function()->prototype()));
4011 Handle<JSFunction> format_date_to_parts = Handle<JSFunction>::cast( 4027 Handle<JSFunction> format_date_to_parts = Handle<JSFunction>::cast(
4012 JSReceiver::GetProperty( 4028 JSReceiver::GetProperty(
4013 exports_container, 4029 exports_container,
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 } 5257 }
5242 5258
5243 5259
5244 // Called when the top-level V8 mutex is destroyed. 5260 // Called when the top-level V8 mutex is destroyed.
5245 void Bootstrapper::FreeThreadResources() { 5261 void Bootstrapper::FreeThreadResources() {
5246 DCHECK(!IsActive()); 5262 DCHECK(!IsActive());
5247 } 5263 }
5248 5264
5249 } // namespace internal 5265 } // namespace internal
5250 } // namespace v8 5266 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698