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

Side by Side Diff: src/runtime.cc

Issue 125043: Move the default return handling to please some versions of gcc.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « no previous file | 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 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 6318 matching lines...) Expand 10 before | Expand all | Expand 10 after
6329 return MaterializeLocalScope(frame_); 6329 return MaterializeLocalScope(frame_);
6330 break; 6330 break;
6331 case ScopeIterator::ScopeTypeWith: 6331 case ScopeIterator::ScopeTypeWith:
6332 // Return the with object. 6332 // Return the with object.
6333 return Handle<JSObject>(CurrentContext()->extension()); 6333 return Handle<JSObject>(CurrentContext()->extension());
6334 break; 6334 break;
6335 case ScopeIterator::ScopeTypeClosure: 6335 case ScopeIterator::ScopeTypeClosure:
6336 // Materialize the content of the closure scope into a JSObject. 6336 // Materialize the content of the closure scope into a JSObject.
6337 return MaterializeClosure(CurrentContext()); 6337 return MaterializeClosure(CurrentContext());
6338 break; 6338 break;
6339 default:
6340 UNREACHABLE();
6341 return Handle<JSObject>();
6342 } 6339 }
6340 UNREACHABLE();
6341 return Handle<JSObject>();
6343 } 6342 }
6344 6343
6345 // Return the context for this scope. For the local context there might not 6344 // Return the context for this scope. For the local context there might not
6346 // be an actual context. 6345 // be an actual context.
6347 Handle<Context> CurrentContext() { 6346 Handle<Context> CurrentContext() {
6348 if (at_local_ && context_->closure() != *function_) { 6347 if (at_local_ && context_->closure() != *function_) {
6349 return Handle<Context>(); 6348 return Handle<Context>();
6350 } 6349 }
6351 return context_; 6350 return context_;
6352 } 6351 }
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
7474 } else { 7473 } else {
7475 // Handle last resort GC and make sure to allow future allocations 7474 // Handle last resort GC and make sure to allow future allocations
7476 // to grow the heap without causing GCs (if possible). 7475 // to grow the heap without causing GCs (if possible).
7477 Counters::gc_last_resort_from_js.Increment(); 7476 Counters::gc_last_resort_from_js.Increment();
7478 Heap::CollectAllGarbage(); 7477 Heap::CollectAllGarbage();
7479 } 7478 }
7480 } 7479 }
7481 7480
7482 7481
7483 } } // namespace v8::internal 7482 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698