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

Issue 10821076: - Allow parsing of external methods. (Closed)

Created:
8 years, 4 months ago by Ivan Posva
Modified:
8 years, 4 months ago
Reviewers:
hausner, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, kasperl, Lasse Reichstein Nielsen
Visibility:
Public.

Description

- Allow parsing of external methods. Committed: https://code.google.com/p/dart/source/detail?r=10028

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -22 lines) Patch
M runtime/vm/code_descriptors_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/code_patcher_ia32_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/compiler.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 4 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 5 chunks +10 lines, -8 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 23 chunks +53 lines, -8 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/runtime_entry_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stub_code_ia32_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/token.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/unit_test.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A tests/language/external_test.dart View 1 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Ivan Posva
8 years, 4 months ago (2012-07-28 01:03:42 UTC) #1
hausner
LGTM but I am missing a test to make sure an exception is thrown if ...
8 years, 4 months ago (2012-07-30 16:22:41 UTC) #2
hausner
One more comment. https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/parser.cc#newcode2504 runtime/vm/parser.cc:2504: Can a field be external? If ...
8 years, 4 months ago (2012-07-30 16:25:59 UTC) #3
siva
LGTM. I agree with Mathias, external could be made similar to native maybe we could ...
8 years, 4 months ago (2012-07-30 17:12:39 UTC) #4
Ivan Posva
On 2012/07/30 17:12:39, asiva wrote: > LGTM. > > I agree with Mathias, external could ...
8 years, 4 months ago (2012-07-30 18:19:54 UTC) #5
Ivan Posva
8 years, 4 months ago (2012-07-30 22:33:33 UTC) #6
https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/compile...
File runtime/vm/compiler.cc (right):

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/compile...
runtime/vm/compiler.cc:451: false,  // not external
On 2012/07/30 17:12:39, asiva wrote:
> missing '.'

Done.

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/dart_ap...
File runtime/vm/dart_api_impl_test.cc (right):

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/dart_ap...
runtime/vm/dart_api_impl_test.cc:5390: "  return 4 /* topLevel(2) */;\n"
On 2012/07/30 17:12:39, asiva wrote:
> Why not make this a test for ensuring an exception is thrown when there is a
> missing patch instead of commenting out the code with a TODO.

Adding a language test for some of this functionality and negative testing.

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/parser....
runtime/vm/parser.cc:2504: 
On 2012/07/30 16:25:59, hausner wrote:
> Can a field be external? If not, this needs to be checked here.

Done.

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/parser....
runtime/vm/parser.cc:4533: (is_external && (CurrentToken() ==
Token::kSEMICOLON))) {
On 2012/07/30 16:22:41, hausner wrote:
> I don't think you need to check for the semicolon here. All this function
needs
> to do is checking tokens minimally until we know that we are looking at a
> function declaration, not anything else. 

Done.

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/raw_obj...
File runtime/vm/raw_object.h (right):

https://chromiumcodereview.appspot.com/10821076/diff/10001/runtime/vm/raw_obj...
runtime/vm/raw_object.h:585: bool is_external_;
On 2012/07/30 17:12:39, asiva wrote:
> I think we should make these bools a bit field set to shrink space. Not in
this
> CL but a different one.

As far as I know this is something Todd had started work on.

Powered by Google App Engine
This is Rietveld 408576698