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

Side by Side Diff: src/bootstrapper.cc

Issue 23414008: Revert "Snapshot i18n Javascript code" and "Fix mjsunit/debug-script after r16298". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/extensions/i18n/break-iterator.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 27 matching lines...) Expand all
38 #include "macro-assembler.h" 38 #include "macro-assembler.h"
39 #include "natives.h" 39 #include "natives.h"
40 #include "objects-visiting.h" 40 #include "objects-visiting.h"
41 #include "platform.h" 41 #include "platform.h"
42 #include "snapshot.h" 42 #include "snapshot.h"
43 #include "extensions/externalize-string-extension.h" 43 #include "extensions/externalize-string-extension.h"
44 #include "extensions/gc-extension.h" 44 #include "extensions/gc-extension.h"
45 #include "extensions/statistics-extension.h" 45 #include "extensions/statistics-extension.h"
46 #include "code-stubs.h" 46 #include "code-stubs.h"
47 47
48 #if defined(V8_I18N_SUPPORT)
49 #include "extensions/i18n/i18n-extension.h"
50 #endif
51
48 namespace v8 { 52 namespace v8 {
49 namespace internal { 53 namespace internal {
50 54
51 55
52 NativesExternalStringResource::NativesExternalStringResource( 56 NativesExternalStringResource::NativesExternalStringResource(
53 Bootstrapper* bootstrapper, 57 Bootstrapper* bootstrapper,
54 const char* source, 58 const char* source,
55 size_t length) 59 size_t length)
56 : data_(source), length_(length) { 60 : data_(source), length_(length) {
57 if (bootstrapper->delete_these_non_arrays_on_tear_down_ == NULL) { 61 if (bootstrapper->delete_these_non_arrays_on_tear_down_ == NULL) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 99
96 void Bootstrapper::Initialize(bool create_heap_objects) { 100 void Bootstrapper::Initialize(bool create_heap_objects) {
97 extensions_cache_.Initialize(create_heap_objects); 101 extensions_cache_.Initialize(create_heap_objects);
98 } 102 }
99 103
100 104
101 void Bootstrapper::InitializeOncePerProcess() { 105 void Bootstrapper::InitializeOncePerProcess() {
102 GCExtension::Register(); 106 GCExtension::Register();
103 ExternalizeStringExtension::Register(); 107 ExternalizeStringExtension::Register();
104 StatisticsExtension::Register(); 108 StatisticsExtension::Register();
109 #if defined(V8_I18N_SUPPORT)
110 v8_i18n::Extension::Register();
111 #endif
105 } 112 }
106 113
107 114
108 char* Bootstrapper::AllocateAutoDeletedArray(int bytes) { 115 char* Bootstrapper::AllocateAutoDeletedArray(int bytes) {
109 char* memory = new char[bytes]; 116 char* memory = new char[bytes];
110 if (memory != NULL) { 117 if (memory != NULL) {
111 if (delete_these_arrays_on_tear_down_ == NULL) { 118 if (delete_these_arrays_on_tear_down_ == NULL) {
112 delete_these_arrays_on_tear_down_ = new List<char*>(2); 119 delete_these_arrays_on_tear_down_ = new List<char*>(2);
113 } 120 }
114 delete_these_arrays_on_tear_down_->Add(memory); 121 delete_these_arrays_on_tear_down_->Add(memory);
(...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 } 2288 }
2282 2289
2283 if (FLAG_expose_gc) InstallExtension(isolate, "v8/gc", &extension_states); 2290 if (FLAG_expose_gc) InstallExtension(isolate, "v8/gc", &extension_states);
2284 if (FLAG_expose_externalize_string) { 2291 if (FLAG_expose_externalize_string) {
2285 InstallExtension(isolate, "v8/externalize", &extension_states); 2292 InstallExtension(isolate, "v8/externalize", &extension_states);
2286 } 2293 }
2287 if (FLAG_track_gc_object_stats) { 2294 if (FLAG_track_gc_object_stats) {
2288 InstallExtension(isolate, "v8/statistics", &extension_states); 2295 InstallExtension(isolate, "v8/statistics", &extension_states);
2289 } 2296 }
2290 2297
2298 #if defined(V8_I18N_SUPPORT)
2299 if (FLAG_enable_i18n) {
2300 InstallExtension(isolate, "v8/i18n", &extension_states);
2301 }
2302 #endif
2303
2291 if (extensions == NULL) return true; 2304 if (extensions == NULL) return true;
2292 // Install required extensions 2305 // Install required extensions
2293 int count = v8::ImplementationUtilities::GetNameCount(extensions); 2306 int count = v8::ImplementationUtilities::GetNameCount(extensions);
2294 const char** names = v8::ImplementationUtilities::GetNames(extensions); 2307 const char** names = v8::ImplementationUtilities::GetNames(extensions);
2295 for (int i = 0; i < count; i++) { 2308 for (int i = 0; i < count; i++) {
2296 if (!InstallExtension(isolate, names[i], &extension_states)) 2309 if (!InstallExtension(isolate, names[i], &extension_states))
2297 return false; 2310 return false;
2298 } 2311 }
2299 2312
2300 return true; 2313 return true;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 return from + sizeof(NestingCounterType); 2673 return from + sizeof(NestingCounterType);
2661 } 2674 }
2662 2675
2663 2676
2664 // Called when the top-level V8 mutex is destroyed. 2677 // Called when the top-level V8 mutex is destroyed.
2665 void Bootstrapper::FreeThreadResources() { 2678 void Bootstrapper::FreeThreadResources() {
2666 ASSERT(!IsActive()); 2679 ASSERT(!IsActive());
2667 } 2680 }
2668 2681
2669 } } // namespace v8::internal 2682 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/extensions/i18n/break-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698