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

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: Rebase on current master. 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
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 7476 matching lines...) Expand 10 before | Expand all | Expand 10 after
7487 ASSERT(result != Isolate::Current()->has_pending_exception()); 7487 ASSERT(result != Isolate::Current()->has_pending_exception());
7488 if (!result && flag == CLEAR_EXCEPTION) { 7488 if (!result && flag == CLEAR_EXCEPTION) {
7489 info->isolate()->clear_pending_exception(); 7489 info->isolate()->clear_pending_exception();
7490 } 7490 }
7491 return result; 7491 return result;
7492 } 7492 }
7493 7493
7494 7494
7495 bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared, 7495 bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared,
7496 ClearExceptionFlag flag) { 7496 ClearExceptionFlag flag) {
7497 CompilationInfo info(shared); 7497 Zone zone(shared->GetIsolate());
7498 CompilationInfo info(shared, &zone);
7499 ZoneScope scope(&zone, DELETE_ON_EXIT);
7498 return CompileLazyHelper(&info, flag); 7500 return CompileLazyHelper(&info, flag);
7499 } 7501 }
7500 7502
7501 7503
7502 void SharedFunctionInfo::ClearOptimizedCodeMap() { 7504 void SharedFunctionInfo::ClearOptimizedCodeMap() {
7503 set_optimized_code_map(Smi::FromInt(0)); 7505 set_optimized_code_map(Smi::FromInt(0));
7504 } 7506 }
7505 7507
7506 7508
7507 void SharedFunctionInfo::AddToOptimizedCodeMap( 7509 void SharedFunctionInfo::AddToOptimizedCodeMap(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
7547 } 7549 }
7548 7550
7549 7551
7550 bool JSFunction::CompileLazy(Handle<JSFunction> function, 7552 bool JSFunction::CompileLazy(Handle<JSFunction> function,
7551 ClearExceptionFlag flag) { 7553 ClearExceptionFlag flag) {
7552 bool result = true; 7554 bool result = true;
7553 if (function->shared()->is_compiled()) { 7555 if (function->shared()->is_compiled()) {
7554 function->ReplaceCode(function->shared()->code()); 7556 function->ReplaceCode(function->shared()->code());
7555 function->shared()->set_code_age(0); 7557 function->shared()->set_code_age(0);
7556 } else { 7558 } else {
7557 CompilationInfo info(function); 7559 Zone zone(function->GetIsolate());
7560 CompilationInfo info(function, &zone);
7561 ZoneScope scope(&zone, DELETE_ON_EXIT);
7558 result = CompileLazyHelper(&info, flag); 7562 result = CompileLazyHelper(&info, flag);
7559 ASSERT(!result || function->is_compiled()); 7563 ASSERT(!result || function->is_compiled());
7560 } 7564 }
7561 return result; 7565 return result;
7562 } 7566 }
7563 7567
7564 7568
7565 bool JSFunction::CompileOptimized(Handle<JSFunction> function, 7569 bool JSFunction::CompileOptimized(Handle<JSFunction> function,
7566 int osr_ast_id, 7570 int osr_ast_id,
7567 ClearExceptionFlag flag) { 7571 ClearExceptionFlag flag) {
7568 CompilationInfo info(function); 7572 Zone zone(function->GetIsolate());
7573 CompilationInfo info(function, &zone);
7574 ZoneScope scope(&zone, DELETE_ON_EXIT);
7569 info.SetOptimizing(osr_ast_id); 7575 info.SetOptimizing(osr_ast_id);
7570 return CompileLazyHelper(&info, flag); 7576 return CompileLazyHelper(&info, flag);
7571 } 7577 }
7572 7578
7573 7579
7574 bool JSFunction::IsInlineable() { 7580 bool JSFunction::IsInlineable() {
7575 if (IsBuiltin()) return false; 7581 if (IsBuiltin()) return false;
7576 SharedFunctionInfo* shared_info = shared(); 7582 SharedFunctionInfo* shared_info = shared();
7577 // Check that the function has a script associated with it. 7583 // Check that the function has a script associated with it.
7578 if (!shared_info->script()->IsScript()) return false; 7584 if (!shared_info->script()->IsScript()) return false;
(...skipping 5697 matching lines...) Expand 10 before | Expand all | Expand 10 after
13276 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13282 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13277 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13283 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13278 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13284 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13279 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13285 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13280 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13286 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13281 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13287 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13282 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13288 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13283 } 13289 }
13284 13290
13285 } } // namespace v8::internal 13291 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/parser.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698