|
Optimize AOT's switchable calls for the monomorphic case.
The call sequence is very similar to a classic IC call, except the guarded class and the target are loaded indirectly from the constant pool instead of as immediates. In the monomorphic case, we call directly to the expected target with a class check in the callee. In the unlinked, polymorphic and megamorphic cases, we call a stub; these case are now call-through instead of call-and-return.
Every code, except stubs involved in switchable calls, includes the class check sequence at the beginning. So we now distinguish between a checked and an unchecked entry point. Generated code except the switchable call continues to use the unchecked entry point.
PC offsets are calculated relative to the beginning of the instruction stream, rather than either entry point.
BUG=
R=fschneider@google.com
Committed: https://github.com/dart-lang/sdk/commit/7ff2dd4117f076adb09d3330be3afd1355eada8b
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+949 lines, -354 lines) |
Patch |
|
M |
runtime/lib/stacktrace.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/assembler.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_arm.h
|
View
|
1
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_arm.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_arm64.h
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_arm64.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+48 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_mips.h
|
View
|
1
2
3
4
5
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_mips.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_x64.h
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_x64.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+40 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/assembler_x64_test.cc
|
View
|
1
2
3
4
|
6 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/clustered_snapshot.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
8 chunks |
+130 lines, -19 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher.h
|
View
|
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_arm.cc
|
View
|
1
|
1 chunk |
+23 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_arm64.cc
|
View
|
|
1 chunk |
+23 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_arm64_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_arm_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_dbc.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+23 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_ia32.cc
|
View
|
1
|
2 chunks |
+20 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_mips.cc
|
View
|
1
2
3
|
1 chunk |
+23 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_mips_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/code_patcher_x64.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+44 lines, -26 lines |
0 comments
|
Download
|
|
M |
runtime/vm/compiler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/debugger.cc
|
View
|
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/debugger_dbc.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/debugger_ia32.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/disassembler.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/disassembler_ia32.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/exceptions.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/find_code_object_test.cc
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler_arm.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler_arm64.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler_ia32.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler_mips.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/vm/flow_graph_compiler_x64.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm.h
|
View
|
1
|
1 chunk |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm.cc
|
View
|
1
|
1 chunk |
+20 lines, -15 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm64.h
|
View
|
1
|
1 chunk |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm64.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+20 lines, -15 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm64_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_arm_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_dbc.h
|
View
|
1
2
3
4
5
|
1 chunk |
+11 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_dbc.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+15 lines, -10 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_mips.h
|
View
|
1
2
3
|
1 chunk |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_mips.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+20 lines, -15 lines |
0 comments
|
Download
|
|
M |
runtime/vm/instructions_mips_test.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
5 chunks |
+52 lines, -8 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.cc
|
View
|
|
16 chunks |
+24 lines, -23 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object_reload.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/object_service.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
runtime/vm/precompiler.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/profiler.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
runtime/vm/profiler.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
runtime/vm/profiler_service.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
runtime/vm/profiler_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/raw_object.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/runtime_entry_list.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/service_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/simulator_arm.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/simulator_arm64.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/simulator_mips.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/snapshot.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/stack_frame.cc
|
View
|
|
4 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code.h
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code_arm.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+32 lines, -7 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code_arm64.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+32 lines, -7 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code_ia32.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code_mips.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+32 lines, -8 lines |
0 comments
|
Download
|
|
M |
runtime/vm/stub_code_x64.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+32 lines, -8 lines |
0 comments
|
Download
|
|
M |
runtime/vm/thread.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
runtime/vm/unit_test.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/unit_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 10 (5 generated)
|