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

Side by Side Diff: src/d8.cc

Issue 7066048: Compress sources of JS libraries in addition to the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make decompressor class public Created 9 years, 6 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/bootstrapper.cc ('k') | src/mksnapshot.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 debug->Load(); 559 debug->Load();
560 i::Handle<i::JSObject> js_debug 560 i::Handle<i::JSObject> js_debug
561 = i::Handle<i::JSObject>(debug->debug_context()->global()); 561 = i::Handle<i::JSObject>(debug->debug_context()->global());
562 utility_context_->Global()->Set(String::New("$debug"), 562 utility_context_->Global()->Set(String::New("$debug"),
563 Utils::ToLocal(js_debug)); 563 Utils::ToLocal(js_debug));
564 #endif 564 #endif
565 565
566 // Run the d8 shell utility script in the utility context 566 // Run the d8 shell utility script in the utility context
567 int source_index = i::NativesCollection<i::D8>::GetIndex("d8"); 567 int source_index = i::NativesCollection<i::D8>::GetIndex("d8");
568 i::Vector<const char> shell_source 568 i::Vector<const char> shell_source
569 = i::NativesCollection<i::D8>::GetScriptSource(source_index); 569 = i::NativesCollection<i::D8>::GetRawScriptSource(source_index);
570 i::Vector<const char> shell_source_name 570 i::Vector<const char> shell_source_name
571 = i::NativesCollection<i::D8>::GetScriptName(source_index); 571 = i::NativesCollection<i::D8>::GetScriptName(source_index);
572 Handle<String> source = String::New(shell_source.start(), 572 Handle<String> source = String::New(shell_source.start(),
573 shell_source.length()); 573 shell_source.length());
574 Handle<String> name = String::New(shell_source_name.start(), 574 Handle<String> name = String::New(shell_source_name.start(),
575 shell_source_name.length()); 575 shell_source_name.length());
576 Handle<Script> script = Script::Compile(source, name); 576 Handle<Script> script = Script::Compile(source, name);
577 script->Run(); 577 script->Run();
578 578
579 // Mark the d8 shell script as native to avoid it showing up as normal source 579 // Mark the d8 shell script as native to avoid it showing up as normal source
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 888
889 889
890 } // namespace v8 890 } // namespace v8
891 891
892 892
893 #ifndef GOOGLE3 893 #ifndef GOOGLE3
894 int main(int argc, char* argv[]) { 894 int main(int argc, char* argv[]) {
895 return v8::Shell::Main(argc, argv); 895 return v8::Shell::Main(argc, argv);
896 } 896 }
897 #endif 897 #endif
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698