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

Side by Side Diff: src/api.cc

Issue 1292053002: Rework startup-data-util. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Same as Patch Set 3, but revert the "Test for all platforms" bits. Created 5 years, 4 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 | « samples/shell.cc ('k') | src/d8.cc » ('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 // 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "src/property.h" 43 #include "src/property.h"
44 #include "src/property-details.h" 44 #include "src/property-details.h"
45 #include "src/prototype.h" 45 #include "src/prototype.h"
46 #include "src/runtime/runtime.h" 46 #include "src/runtime/runtime.h"
47 #include "src/runtime-profiler.h" 47 #include "src/runtime-profiler.h"
48 #include "src/sampler.h" 48 #include "src/sampler.h"
49 #include "src/scanner-character-streams.h" 49 #include "src/scanner-character-streams.h"
50 #include "src/simulator.h" 50 #include "src/simulator.h"
51 #include "src/snapshot/natives.h" 51 #include "src/snapshot/natives.h"
52 #include "src/snapshot/snapshot.h" 52 #include "src/snapshot/snapshot.h"
53 #include "src/startup-data-util.h"
53 #include "src/unicode-inl.h" 54 #include "src/unicode-inl.h"
54 #include "src/v8.h" 55 #include "src/v8.h"
55 #include "src/v8threads.h" 56 #include "src/v8threads.h"
56 #include "src/version.h" 57 #include "src/version.h"
57 #include "src/vm-state-inl.h" 58 #include "src/vm-state-inl.h"
58 59
59 60
60 namespace v8 { 61 namespace v8 {
61 62
62 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr)) 63 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr))
(...skipping 5323 matching lines...) Expand 10 before | Expand all | Expand 10 after
5386 space_available_size_(0), 5387 space_available_size_(0),
5387 physical_space_size_(0) { } 5388 physical_space_size_(0) { }
5388 5389
5389 5390
5390 HeapObjectStatistics::HeapObjectStatistics() 5391 HeapObjectStatistics::HeapObjectStatistics()
5391 : object_type_(nullptr), 5392 : object_type_(nullptr),
5392 object_sub_type_(nullptr), 5393 object_sub_type_(nullptr),
5393 object_count_(0), 5394 object_count_(0),
5394 object_size_(0) {} 5395 object_size_(0) {}
5395 5396
5397
5396 bool v8::V8::InitializeICU(const char* icu_data_file) { 5398 bool v8::V8::InitializeICU(const char* icu_data_file) {
5397 return i::InitializeICU(icu_data_file); 5399 return i::InitializeICU(icu_data_file);
5398 } 5400 }
5399 5401
5400 5402
5403 void v8::V8::InitializeExternalStartupData(const char* directory_path) {
5404 i::InitializeExternalStartupData(directory_path);
5405 }
5406
5407
5408 void v8::V8::InitializeExternalStartupData(const char* natives_blob,
5409 const char* snapshot_blob) {
5410 i::InitializeExternalStartupData(natives_blob, snapshot_blob);
5411 }
5412
5413
5401 const char* v8::V8::GetVersion() { 5414 const char* v8::V8::GetVersion() {
5402 return i::Version::GetVersion(); 5415 return i::Version::GetVersion();
5403 } 5416 }
5404 5417
5405 5418
5406 static i::Handle<i::Context> CreateEnvironment( 5419 static i::Handle<i::Context> CreateEnvironment(
5407 i::Isolate* isolate, v8::ExtensionConfiguration* extensions, 5420 i::Isolate* isolate, v8::ExtensionConfiguration* extensions,
5408 v8::Local<ObjectTemplate> global_template, 5421 v8::Local<ObjectTemplate> global_template,
5409 v8::Local<Value> maybe_global_proxy) { 5422 v8::Local<Value> maybe_global_proxy) {
5410 i::Handle<i::Context> env; 5423 i::Handle<i::Context> env;
(...skipping 3009 matching lines...) Expand 10 before | Expand all | Expand 10 after
8420 Address callback_address = 8433 Address callback_address =
8421 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8434 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8422 VMState<EXTERNAL> state(isolate); 8435 VMState<EXTERNAL> state(isolate);
8423 ExternalCallbackScope call_scope(isolate, callback_address); 8436 ExternalCallbackScope call_scope(isolate, callback_address);
8424 callback(info); 8437 callback(info);
8425 } 8438 }
8426 8439
8427 8440
8428 } // namespace internal 8441 } // namespace internal
8429 } // namespace v8 8442 } // namespace v8
OLDNEW
« no previous file with comments | « samples/shell.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698