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

Issue 9189003: Move assert.h/assert.cc from runtime/vm to runtime/platform (Closed)

Created:
8 years, 11 months ago by Søren Gjesse
Modified:
8 years, 11 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Move assert.h/assert.cc from runtime/vm to runtime/platform The purpose of this change is twofold: 1. Source in the bin directory can now use the same assertions as source in the vm directory. The ASSERT macro used by the code in runtime/bin was just defined to use assert from the standard C library. 2. Moving other implementation parts from runtime/vm to runtime/platform (e.g. classes Monitor and Mutex) for sharing between runtime/bin and runtime/vm will be easier as these implementations rely on these assertion macros. Created two gypi files for the platform directory. One for the headers and one for the source. The source one is only included when building the VM library and will be present in libdart.a when the dart executable is linked. All the code for asserts is still in the dart namespace. Also re-arranged the order of includes to be alphabetically in the files touched. R=ager@google.com, iposva@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3335

Patch Set 1 #

Patch Set 2 : Fixed include order in one place #

Patch Set 3 : Fixing vm/assert.h for _macos, _win, _arm and _x64 files #

Total comments: 68

Patch Set 4 : Addressed review comments from iposva@ and ager@ #

Total comments: 4

Patch Set 5 : Addressed additional comments from ager@ #

Patch Set 6 : Rebased to r3334 #

Patch Set 7 : Check for correct rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -636 lines) Patch
M runtime/bin/bin.gypi View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/builtin.h View 1 chunk +1 line, -17 lines 0 comments Download
M runtime/bin/builtin_natives.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/directory.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M runtime/bin/file_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/file_win.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/bin/thread_pool_test.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M runtime/lib/array.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/lib/byte_buffer.cc View 1 chunk +3 lines, -4 lines 0 comments Download
runtime/lib/isolate.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/lib/regexp.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/lib/regexp_jsc.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
A + runtime/platform/assert.h View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
A + runtime/platform/assert.cc View 4 5 2 chunks +3 lines, -2 lines 0 comments Download
A + runtime/platform/platform_headers.gypi View 4 5 1 chunk +2 lines, -1 line 0 comments Download
M runtime/platform/platform_sources.gypi View 4 5 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/allocation.h View 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/allocation.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/allocation_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler_arm.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler_ia32.h View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler_x64.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
D runtime/vm/assert.h View 4 5 1 chunk +0 lines, -296 lines 0 comments Download
D runtime/vm/assert.cc View 4 5 1 chunk +0 lines, -48 lines 0 comments Download
M runtime/vm/assert_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
runtime/vm/ast.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/ast_printer_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/ast_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/bigint_operations_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/bitfield_test.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/boolfield.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/boolfield_test.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/class_finalizer_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/code_generator_ia32_test.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/vm/code_generator_x64_test.cc View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/vm/code_index_table.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/code_index_table_test.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/vm/compiler_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/constants_ia32.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/cpu_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/dart_entry_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/debuginfo.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/disassembler_arm.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/disassembler_ia32.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/disassembler_x64.cc View 1 2 3 2 chunks +4 lines, -5 lines 0 comments Download
M runtime/vm/exceptions_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/flags.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/flags.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/flags_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/freelist.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/freelist_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/growable_array_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/handles.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/handles_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/heap.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/heap.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/heap_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/isolate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/isolate_linux.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/isolate_macos.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/isolate_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/isolate_win.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/isolate_win.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/memory_region.h View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/memory_region_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/message_queue_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/native_arguments.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/native_arguments.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object_arm_test.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object_ia32_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object_x64_test.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/os_linux.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/os_macos.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/os_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/os_win.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/pages.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
runtime/vm/pages_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/port_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/random.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/random_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/raw_object.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/resolver_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/scanner.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/scanner_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/scavenger.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/scopes_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/vm/stack_frame_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/store_buffer.h View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/store_buffer.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/stub_code.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/thread.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/thread_linux.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/thread_macos.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/thread_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/thread_win.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/token.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/utils.h View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/utils_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
runtime/vm/verifier.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory_linux.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/virtual_memory_macos.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/virtual_memory_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory_win.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/vm.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/zone.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/zone_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Søren Gjesse
8 years, 11 months ago (2012-01-13 10:37:04 UTC) #1
Mads Ager (chromium)
Some of the reordering of headers should be undone to always include the header file ...
8 years, 11 months ago (2012-01-13 14:42:05 UTC) #2
Ivan Posva
Please restore the header order according to http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Names_and_Order_of_Includes including the empty line between implemented header ...
8 years, 11 months ago (2012-01-13 23:22:06 UTC) #3
Søren Gjesse
Thanks for looking at all these files. I am sorry about the include file ordering ...
8 years, 11 months ago (2012-01-16 08:58:00 UTC) #4
Mads Ager (google)
lgtm http://codereview.chromium.org/9189003/diff/16001/runtime/platform/assert.h File runtime/platform/assert.h (right): http://codereview.chromium.org/9189003/diff/16001/runtime/platform/assert.h#newcode1 runtime/platform/assert.h:1: // Copyright (c) 2011, the Dart project authors. ...
8 years, 11 months ago (2012-01-16 10:20:05 UTC) #5
Søren Gjesse
8 years, 11 months ago (2012-01-16 11:56:44 UTC) #6
http://codereview.chromium.org/9189003/diff/16001/runtime/platform/assert.h
File runtime/platform/assert.h (right):

http://codereview.chromium.org/9189003/diff/16001/runtime/platform/assert.h#n...
runtime/platform/assert.h:1: // Copyright (c) 2011, the Dart project authors. 
Please see the AUTHORS file
On 2012/01/16 10:20:05, Mads Ager wrote:
> 2012

Done.

http://codereview.chromium.org/9189003/diff/16001/runtime/vm/boolfield_test.cc
File runtime/vm/boolfield_test.cc (right):

http://codereview.chromium.org/9189003/diff/16001/runtime/vm/boolfield_test.c...
runtime/vm/boolfield_test.cc:6: #include "vm/globals.h"
On 2012/01/16 10:20:05, Mads Ager wrote:
> I don't really see anything in this file that uses globals.h? 

It is needed by boolfield.h (type uword). Moved it there.

Powered by Google App Engine
This is Rietveld 408576698