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

Side by Side Diff: src/runtime.cc

Issue 172088: Analyze functions for assignment to this properties (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/parser.cc ('k') | src/v8-counters.h » ('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 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 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 } 4373 }
4374 } 4374 }
4375 4375
4376 bool first_allocation = !function->has_initial_map(); 4376 bool first_allocation = !function->has_initial_map();
4377 Handle<JSObject> result = Factory::NewJSObject(function); 4377 Handle<JSObject> result = Factory::NewJSObject(function);
4378 if (first_allocation) { 4378 if (first_allocation) {
4379 Handle<Map> map = Handle<Map>(function->initial_map()); 4379 Handle<Map> map = Handle<Map>(function->initial_map());
4380 Handle<Code> stub = ComputeConstructStub(map); 4380 Handle<Code> stub = ComputeConstructStub(map);
4381 function->shared()->set_construct_stub(*stub); 4381 function->shared()->set_construct_stub(*stub);
4382 } 4382 }
4383 Counters::constructed_objects.Increment();
4384 Counters::constructed_objects_runtime.Increment();
4383 return *result; 4385 return *result;
4384 } 4386 }
4385 4387
4386 4388
4387 static Object* Runtime_LazyCompile(Arguments args) { 4389 static Object* Runtime_LazyCompile(Arguments args) {
4388 HandleScope scope; 4390 HandleScope scope;
4389 ASSERT(args.length() == 1); 4391 ASSERT(args.length() == 1);
4390 4392
4391 Handle<JSFunction> function = args.at<JSFunction>(0); 4393 Handle<JSFunction> function = args.at<JSFunction>(0);
4392 #ifdef DEBUG 4394 #ifdef DEBUG
(...skipping 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after
7630 } else { 7632 } else {
7631 // Handle last resort GC and make sure to allow future allocations 7633 // Handle last resort GC and make sure to allow future allocations
7632 // to grow the heap without causing GCs (if possible). 7634 // to grow the heap without causing GCs (if possible).
7633 Counters::gc_last_resort_from_js.Increment(); 7635 Counters::gc_last_resort_from_js.Increment();
7634 Heap::CollectAllGarbage(); 7636 Heap::CollectAllGarbage();
7635 } 7637 }
7636 } 7638 }
7637 7639
7638 7640
7639 } } // namespace v8::internal 7641 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698