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

Side by Side Diff: src/objects.cc

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename CompilationInfoZone to ZoneWithCompilationInfo Created 8 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 | « src/mips/lithium-codegen-mips.h ('k') | src/parser.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 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 7471 matching lines...) Expand 10 before | Expand all | Expand 10 after
7482 if (!result && flag == CLEAR_EXCEPTION) { 7482 if (!result && flag == CLEAR_EXCEPTION) {
7483 info->isolate()->clear_pending_exception(); 7483 info->isolate()->clear_pending_exception();
7484 } 7484 }
7485 return result; 7485 return result;
7486 } 7486 }
7487 7487
7488 7488
7489 bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared, 7489 bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared,
7490 ClearExceptionFlag flag) { 7490 ClearExceptionFlag flag) {
7491 ASSERT(shared->allows_lazy_compilation_without_context()); 7491 ASSERT(shared->allows_lazy_compilation_without_context());
7492 CompilationInfo info(shared); 7492 CompilationInfoWithZone info(shared);
7493 return CompileLazyHelper(&info, flag); 7493 return CompileLazyHelper(&info, flag);
7494 } 7494 }
7495 7495
7496 7496
7497 void SharedFunctionInfo::ClearOptimizedCodeMap() { 7497 void SharedFunctionInfo::ClearOptimizedCodeMap() {
7498 set_optimized_code_map(Smi::FromInt(0)); 7498 set_optimized_code_map(Smi::FromInt(0));
7499 } 7499 }
7500 7500
7501 7501
7502 void SharedFunctionInfo::AddToOptimizedCodeMap( 7502 void SharedFunctionInfo::AddToOptimizedCodeMap(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
7543 7543
7544 7544
7545 bool JSFunction::CompileLazy(Handle<JSFunction> function, 7545 bool JSFunction::CompileLazy(Handle<JSFunction> function,
7546 ClearExceptionFlag flag) { 7546 ClearExceptionFlag flag) {
7547 bool result = true; 7547 bool result = true;
7548 if (function->shared()->is_compiled()) { 7548 if (function->shared()->is_compiled()) {
7549 function->ReplaceCode(function->shared()->code()); 7549 function->ReplaceCode(function->shared()->code());
7550 function->shared()->set_code_age(0); 7550 function->shared()->set_code_age(0);
7551 } else { 7551 } else {
7552 ASSERT(function->shared()->allows_lazy_compilation()); 7552 ASSERT(function->shared()->allows_lazy_compilation());
7553 CompilationInfo info(function); 7553 CompilationInfoWithZone info(function);
7554 result = CompileLazyHelper(&info, flag); 7554 result = CompileLazyHelper(&info, flag);
7555 ASSERT(!result || function->is_compiled()); 7555 ASSERT(!result || function->is_compiled());
7556 } 7556 }
7557 return result; 7557 return result;
7558 } 7558 }
7559 7559
7560 7560
7561 bool JSFunction::CompileOptimized(Handle<JSFunction> function, 7561 bool JSFunction::CompileOptimized(Handle<JSFunction> function,
7562 int osr_ast_id, 7562 int osr_ast_id,
7563 ClearExceptionFlag flag) { 7563 ClearExceptionFlag flag) {
7564 CompilationInfo info(function); 7564 CompilationInfoWithZone info(function);
7565 info.SetOptimizing(osr_ast_id); 7565 info.SetOptimizing(osr_ast_id);
7566 return CompileLazyHelper(&info, flag); 7566 return CompileLazyHelper(&info, flag);
7567 } 7567 }
7568 7568
7569 7569
7570 bool JSFunction::EnsureCompiled(Handle<JSFunction> function, 7570 bool JSFunction::EnsureCompiled(Handle<JSFunction> function,
7571 ClearExceptionFlag flag) { 7571 ClearExceptionFlag flag) {
7572 return function->is_compiled() || CompileLazy(function, flag); 7572 return function->is_compiled() || CompileLazy(function, flag);
7573 } 7573 }
7574 7574
(...skipping 5703 matching lines...) Expand 10 before | Expand all | Expand 10 after
13278 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13278 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13279 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13279 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13280 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13280 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13281 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13281 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13282 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13282 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13283 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13283 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13284 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13284 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13285 } 13285 }
13286 13286
13287 } } // namespace v8::internal 13287 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698