Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/codegen.cc b/src/codegen.cc
index 93ae307..4597ae2 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -12,7 +12,6 @@
#include "src/compiler.h"
#include "src/debug/debug.h"
#include "src/parsing/parser.h"
-#include "src/profiler/cpu-profiler.h"
#include "src/runtime/runtime.h"
namespace v8 {
@@ -61,7 +60,6 @@
}
UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction)
-UNARY_MATH_FUNCTION(exp, CreateExpFunction)
#undef UNARY_MATH_FUNCTION
@@ -147,11 +145,12 @@
void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
#ifdef ENABLE_DISASSEMBLER
AllowDeferredHandleDereference allow_deference_for_print_code;
- bool print_code = info->isolate()->bootstrapper()->IsActive()
- ? FLAG_print_builtin_code
- : (FLAG_print_code ||
- (info->IsStub() && FLAG_print_code_stubs) ||
- (info->IsOptimizing() && FLAG_print_opt_code));
+ Isolate* isolate = info->isolate();
+ bool print_code =
+ isolate->bootstrapper()->IsActive()
+ ? FLAG_print_builtin_code
+ : (FLAG_print_code || (info->IsStub() && FLAG_print_code_stubs) ||
+ (info->IsOptimizing() && FLAG_print_opt_code));
if (print_code) {
base::SmartArrayPointer<char> debug_name = info->GetDebugName();
CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer());
@@ -164,7 +163,8 @@
if (print_source) {
Handle<SharedFunctionInfo> shared = info->shared_info();
Handle<Script> script = info->script();
- if (!script->IsUndefined() && !script->source()->IsUndefined()) {
+ if (!script->IsUndefined(isolate) &&
+ !script->source()->IsUndefined(isolate)) {
os << "--- Raw source ---\n";
StringCharacterStream stream(String::cast(script->source()),
shared->start_position());