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

Side by Side Diff: src/handles.cc

Issue 1052003: Keep more track of whether code is from the built... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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
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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 Vector<const char> name = Natives::GetScriptName(index); 773 Vector<const char> name = Natives::GetScriptName(index);
774 774
775 Handle<JSFunction> boilerplate; 775 Handle<JSFunction> boilerplate;
776 776
777 if (!Bootstrapper::NativesCacheLookup(name, &boilerplate)) { 777 if (!Bootstrapper::NativesCacheLookup(name, &boilerplate)) {
778 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); 778 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index);
779 Handle<String> script_name = Factory::NewStringFromAscii(name); 779 Handle<String> script_name = Factory::NewStringFromAscii(name);
780 bool allow_natives_syntax = FLAG_allow_natives_syntax; 780 bool allow_natives_syntax = FLAG_allow_natives_syntax;
781 FLAG_allow_natives_syntax = true; 781 FLAG_allow_natives_syntax = true;
782 boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL, 782 boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL,
783 Handle<String>::null()); 783 Handle<String>::null(), NATIVES_CODE);
784 FLAG_allow_natives_syntax = allow_natives_syntax; 784 FLAG_allow_natives_syntax = allow_natives_syntax;
785 // If the compilation failed (possibly due to stack overflows), we 785 // If the compilation failed (possibly due to stack overflows), we
786 // should never enter the result in the natives cache. Instead we 786 // should never enter the result in the natives cache. Instead we
787 // return from the function without marking the function as having 787 // return from the function without marking the function as having
788 // been lazily loaded. 788 // been lazily loaded.
789 if (boilerplate.is_null()) { 789 if (boilerplate.is_null()) {
790 *pending_exception = true; 790 *pending_exception = true;
791 return; 791 return;
792 } 792 }
793 Bootstrapper::NativesCacheAdd(name, boilerplate); 793 Bootstrapper::NativesCacheAdd(name, boilerplate);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); 838 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map);
839 obj->set_map(*new_map); 839 obj->set_map(*new_map);
840 new_map->set_needs_loading(true); 840 new_map->set_needs_loading(true);
841 // Store the lazy loading info in the constructor field. We'll 841 // Store the lazy loading info in the constructor field. We'll
842 // reestablish the constructor from the fixed array after loading. 842 // reestablish the constructor from the fixed array after loading.
843 new_map->set_constructor(*arr); 843 new_map->set_constructor(*arr);
844 ASSERT(!obj->IsLoaded()); 844 ASSERT(!obj->IsLoaded());
845 } 845 }
846 846
847 } } // namespace v8::internal 847 } } // namespace v8::internal
OLDNEW
« src/globals.h ('K') | « src/globals.h ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698