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

Side by Side Diff: src/api.cc

Issue 22870002: Merged r16012, r16014, r16037, r16042, r16082, r16085, r16101, r16102, r16106 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/code-stubs.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 // 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 return StartupData::kUncompressed; 391 return StartupData::kUncompressed;
392 #endif 392 #endif
393 } 393 }
394 394
395 395
396 enum CompressedStartupDataItems { 396 enum CompressedStartupDataItems {
397 kSnapshot = 0, 397 kSnapshot = 0,
398 kSnapshotContext, 398 kSnapshotContext,
399 kLibraries, 399 kLibraries,
400 kExperimentalLibraries, 400 kExperimentalLibraries,
401 #if defined(ENABLE_I18N_SUPPORT) 401 #if defined(V8_I18N_SUPPORT)
402 kI18NExtension, 402 kI18NExtension,
403 #endif 403 #endif
404 kCompressedStartupDataCount 404 kCompressedStartupDataCount
405 }; 405 };
406 406
407 407
408 int V8::GetCompressedStartupDataCount() { 408 int V8::GetCompressedStartupDataCount() {
409 #ifdef COMPRESS_STARTUP_DATA_BZ2 409 #ifdef COMPRESS_STARTUP_DATA_BZ2
410 return kCompressedStartupDataCount; 410 return kCompressedStartupDataCount;
411 #else 411 #else
(...skipping 23 matching lines...) Expand all
435 435
436 i::Vector<const i::byte> exp_libraries_source = 436 i::Vector<const i::byte> exp_libraries_source =
437 i::ExperimentalNatives::GetScriptsSource(); 437 i::ExperimentalNatives::GetScriptsSource();
438 compressed_data[kExperimentalLibraries].data = 438 compressed_data[kExperimentalLibraries].data =
439 reinterpret_cast<const char*>(exp_libraries_source.start()); 439 reinterpret_cast<const char*>(exp_libraries_source.start());
440 compressed_data[kExperimentalLibraries].compressed_size = 440 compressed_data[kExperimentalLibraries].compressed_size =
441 exp_libraries_source.length(); 441 exp_libraries_source.length();
442 compressed_data[kExperimentalLibraries].raw_size = 442 compressed_data[kExperimentalLibraries].raw_size =
443 i::ExperimentalNatives::GetRawScriptsSize(); 443 i::ExperimentalNatives::GetRawScriptsSize();
444 444
445 #if defined(ENABLE_I18N_SUPPORT) 445 #if defined(V8_I18N_SUPPORT)
446 i::Vector<const ii:byte> i18n_extension_source = 446 i::Vector<const ii:byte> i18n_extension_source =
447 i::I18NNatives::GetScriptsSource(); 447 i::I18NNatives::GetScriptsSource();
448 compressed_data[kI18NExtension].data = 448 compressed_data[kI18NExtension].data =
449 reinterpret_cast<const char*>(i18n_extension_source.start()); 449 reinterpret_cast<const char*>(i18n_extension_source.start());
450 compressed_data[kI18NExtension].compressed_size = 450 compressed_data[kI18NExtension].compressed_size =
451 i18n_extension_source.length(); 451 i18n_extension_source.length();
452 compressed_data[kI18NExtension].raw_size = 452 compressed_data[kI18NExtension].raw_size =
453 i::I18NNatives::GetRawScriptsSize(); 453 i::I18NNatives::GetRawScriptsSize();
454 #endif 454 #endif
455 #endif 455 #endif
(...skipping 19 matching lines...) Expand all
475 decompressed_data[kLibraries].raw_size); 475 decompressed_data[kLibraries].raw_size);
476 i::Natives::SetRawScriptsSource(libraries_source); 476 i::Natives::SetRawScriptsSource(libraries_source);
477 477
478 ASSERT_EQ(i::ExperimentalNatives::GetRawScriptsSize(), 478 ASSERT_EQ(i::ExperimentalNatives::GetRawScriptsSize(),
479 decompressed_data[kExperimentalLibraries].raw_size); 479 decompressed_data[kExperimentalLibraries].raw_size);
480 i::Vector<const char> exp_libraries_source( 480 i::Vector<const char> exp_libraries_source(
481 decompressed_data[kExperimentalLibraries].data, 481 decompressed_data[kExperimentalLibraries].data,
482 decompressed_data[kExperimentalLibraries].raw_size); 482 decompressed_data[kExperimentalLibraries].raw_size);
483 i::ExperimentalNatives::SetRawScriptsSource(exp_libraries_source); 483 i::ExperimentalNatives::SetRawScriptsSource(exp_libraries_source);
484 484
485 #if defined(ENABLE_I18N_SUPPORT) 485 #if defined(V8_I18N_SUPPORT)
486 ASSERT_EQ(i::I18NNatives::GetRawScriptsSize(), 486 ASSERT_EQ(i::I18NNatives::GetRawScriptsSize(),
487 decompressed_data[kI18NExtension].raw_size); 487 decompressed_data[kI18NExtension].raw_size);
488 i::Vector<const char> i18n_extension_source( 488 i::Vector<const char> i18n_extension_source(
489 decompressed_data[kI18NExtension].data, 489 decompressed_data[kI18NExtension].data,
490 decompressed_data[kI18NExtension].raw_size); 490 decompressed_data[kI18NExtension].raw_size);
491 i::I18NNatives::SetRawScriptsSource(i18n_extension_source); 491 i::I18NNatives::SetRawScriptsSource(i18n_extension_source);
492 #endif 492 #endif
493 #endif 493 #endif
494 } 494 }
495 495
(...skipping 7640 matching lines...) Expand 10 before | Expand all | Expand 10 after
8136 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8136 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8137 Address callback_address = 8137 Address callback_address =
8138 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8138 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8139 VMState<EXTERNAL> state(isolate); 8139 VMState<EXTERNAL> state(isolate);
8140 ExternalCallbackScope call_scope(isolate, callback_address); 8140 ExternalCallbackScope call_scope(isolate, callback_address);
8141 return callback(info); 8141 return callback(info);
8142 } 8142 }
8143 8143
8144 8144
8145 } } // namespace v8::internal 8145 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698