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

Unified Diff: src/frames.cc

Issue 1824993002: [builtins] Add support for JS builtins written in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 67a03081e5045a826e08f55454ee9620d2c0b269..8c216a66bbead0a7a0bfa2c2b6a8db17fa57b7ad 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -456,6 +456,9 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
return INTERPRETED;
}
switch (code_obj->kind()) {
+ case Code::BUILTIN:
+ if (marker->IsSmi()) break;
Michael Starzinger 2016/03/22 12:54:32 Please add a one-line comment explaining that this
Benedikt Meurer 2016/03/22 13:01:18 Done.
+ return OPTIMIZED;
case Code::FUNCTION:
return JAVA_SCRIPT;
case Code::OPTIMIZED_FUNCTION:
@@ -981,8 +984,10 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
// Delegate to JS frame in absence of turbofan deoptimization.
// TODO(turbofan): Revisit once we support deoptimization across the board.
- if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() &&
- !FLAG_turbo_asm_deoptimization) {
+ Code* code = LookupCode();
+ if (code->kind() == Code::BUILTIN ||
+ (code->is_turbofanned() && function()->shared()->asm_function() &&
+ !FLAG_turbo_asm_deoptimization)) {
return JavaScriptFrame::Summarize(frames);
}
@@ -1085,7 +1090,6 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
int OptimizedFrame::LookupExceptionHandlerInTable(
int* stack_slots, HandlerTable::CatchPrediction* prediction) {
Code* code = LookupCode();
- DCHECK(code->is_optimized_code());
HandlerTable* table = HandlerTable::cast(code->handler_table());
int pc_offset = static_cast<int>(pc() - code->entry());
if (stack_slots) *stack_slots = code->stack_slots();

Powered by Google App Engine
This is Rietveld 408576698