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

Side by Side Diff: src/runtime.cc

Issue 242124: Follow the spec in disallow function declarations without a name. We... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 7130 matching lines...) Expand 10 before | Expand all | Expand 10 after
7141 Handle<Context> frame_context(Context::cast(frame->context())); 7141 Handle<Context> frame_context(Context::cast(frame->context()));
7142 Handle<Context> function_context(frame_context->fcontext()); 7142 Handle<Context> function_context(frame_context->fcontext());
7143 context = CopyWithContextChain(frame_context, context); 7143 context = CopyWithContextChain(frame_context, context);
7144 7144
7145 // Wrap the evaluation statement in a new function compiled in the newly 7145 // Wrap the evaluation statement in a new function compiled in the newly
7146 // created context. The function has one parameter which has to be called 7146 // created context. The function has one parameter which has to be called
7147 // 'arguments'. This it to have access to what would have been 'arguments' in 7147 // 'arguments'. This it to have access to what would have been 'arguments' in
7148 // the function being debugged. 7148 // the function being debugged.
7149 // function(arguments,__source__) {return eval(__source__);} 7149 // function(arguments,__source__) {return eval(__source__);}
7150 static const char* source_str = 7150 static const char* source_str =
7151 "function(arguments,__source__){return eval(__source__);}"; 7151 "(function(arguments,__source__){return eval(__source__);})";
7152 static const int source_str_length = strlen(source_str); 7152 static const int source_str_length = strlen(source_str);
7153 Handle<String> function_source = 7153 Handle<String> function_source =
7154 Factory::NewStringFromAscii(Vector<const char>(source_str, 7154 Factory::NewStringFromAscii(Vector<const char>(source_str,
7155 source_str_length)); 7155 source_str_length));
7156 Handle<JSFunction> boilerplate = 7156 Handle<JSFunction> boilerplate =
7157 Compiler::CompileEval(function_source, 7157 Compiler::CompileEval(function_source,
7158 context, 7158 context,
7159 context->IsGlobalContext(), 7159 context->IsGlobalContext(),
7160 Compiler::DONT_VALIDATE_JSON); 7160 Compiler::DONT_VALIDATE_JSON);
7161 if (boilerplate.is_null()) return Failure::Exception(); 7161 if (boilerplate.is_null()) return Failure::Exception();
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
7730 } else { 7730 } else {
7731 // Handle last resort GC and make sure to allow future allocations 7731 // Handle last resort GC and make sure to allow future allocations
7732 // to grow the heap without causing GCs (if possible). 7732 // to grow the heap without causing GCs (if possible).
7733 Counters::gc_last_resort_from_js.Increment(); 7733 Counters::gc_last_resort_from_js.Increment();
7734 Heap::CollectAllGarbage(false); 7734 Heap::CollectAllGarbage(false);
7735 } 7735 }
7736 } 7736 }
7737 7737
7738 7738
7739 } } // namespace v8::internal 7739 } } // namespace v8::internal
OLDNEW
« src/debug-delay.js ('K') | « src/parser.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698