Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceLineLocation.java @ 13564:35f637594acc
Truffle: refinements in the management of source information: a new marker interface for empty SourceSections and fix a bug that kept modified source files from being reloaded.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 07 Jan 2014 18:21:20 -0800 |
parents | 69d2e4baa215 |
children | 288c23143d47 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceLineLocation.java Tue Jan 07 18:09:42 2014 -0800 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceLineLocation.java Tue Jan 07 18:21:20 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,11 +38,14 @@ public SourceLineLocation(Source source, int line) { assert source != null; - assert source != SourceSection.NULL; this.source = source; this.line = line; } + public SourceLineLocation(SourceSection sourceSection) { + this(sourceSection.getSource(), sourceSection.getStartLine()); + } + public Source getSource() { return source; }