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

Side by Side Diff: src/runtime.cc

Issue 21256003: Reland "Compilation type and state allocate an unnecessary Smi on v8::Script" (r15940). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « src/objects-printer.cc ('k') | no next file » | 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 12869 matching lines...) Expand 10 before | Expand all | Expand 10 after
12880 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugSetScriptSource) { 12880 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugSetScriptSource) {
12881 HandleScope scope(isolate); 12881 HandleScope scope(isolate);
12882 ASSERT(args.length() == 2); 12882 ASSERT(args.length() == 2);
12883 12883
12884 CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0); 12884 CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0);
12885 CONVERT_ARG_HANDLE_CHECKED(String, source, 1); 12885 CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
12886 12886
12887 RUNTIME_ASSERT(script_wrapper->value()->IsScript()); 12887 RUNTIME_ASSERT(script_wrapper->value()->IsScript());
12888 Handle<Script> script(Script::cast(script_wrapper->value())); 12888 Handle<Script> script(Script::cast(script_wrapper->value()));
12889 12889
12890 int compilation_state = Smi::cast(script->compilation_state())->value(); 12890 int compilation_state = script->compilation_state();
12891 RUNTIME_ASSERT(compilation_state == Script::COMPILATION_STATE_INITIAL); 12891 RUNTIME_ASSERT(compilation_state == Script::COMPILATION_STATE_INITIAL);
12892 script->set_source(*source); 12892 script->set_source(*source);
12893 12893
12894 return isolate->heap()->undefined_value(); 12894 return isolate->heap()->undefined_value();
12895 } 12895 }
12896 12896
12897 12897
12898 RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) { 12898 RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) {
12899 SealHandleScope shs(isolate); 12899 SealHandleScope shs(isolate);
12900 ASSERT(args.length() == 0); 12900 ASSERT(args.length() == 0);
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
13907 // Handle last resort GC and make sure to allow future allocations 13907 // Handle last resort GC and make sure to allow future allocations
13908 // to grow the heap without causing GCs (if possible). 13908 // to grow the heap without causing GCs (if possible).
13909 isolate->counters()->gc_last_resort_from_js()->Increment(); 13909 isolate->counters()->gc_last_resort_from_js()->Increment();
13910 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13910 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13911 "Runtime::PerformGC"); 13911 "Runtime::PerformGC");
13912 } 13912 }
13913 } 13913 }
13914 13914
13915 13915
13916 } } // namespace v8::internal 13916 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698